package com.luomo.wenyuan.modules.wenyuan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.luomo.wenyuan.common.utils.PageUtils;
import com.luomo.wenyuan.common.utils.Query;
import com.luomo.wenyuan.modules.wenyuan.dao.TBookDao;
import com.luomo.wenyuan.modules.wenyuan.entity.TBookEntity;
import com.luomo.wenyuan.modules.wenyuan.service.TBookService;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("tBookService")
public class TBookServiceImpl extends ServiceImpl<TBookDao, TBookEntity> implements TBookService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TBookEntity> page = this.page(
                new Query<TBookEntity>().getPage(params),
                new QueryWrapper<TBookEntity>()
        );
        return new PageUtils(page);
    }

}